<template>
  <el-radio-group v-model="formData[formData.valueName]" :disabled="formStatus === 'info'">
    <el-radio v-for="data in options" :label="data.value">{{ data.label }}</el-radio>
  </el-radio-group>
</template>

<script setup name="radioBox">
import {reactive, ref, watch} from "vue";

const options = ref([])
const props = defineProps({
  formData: {
    type: Object,
    default: () => {},
    required: true
  },
  formStatus: {
    type: String,
    default: 'edit'
  }
})
options.value = JSON.parse(JSON.stringify(props.formData.customizeData))
watch(props,(newProps, oldProps) => {
  options.value = JSON.parse(JSON.stringify(newProps.formData.customizeData))
});
</script>

<style scoped>

</style>
